package com.rockcent.mall.lib.repository;


import com.rockcent.mall.lib.domain.MarketOrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;


/**
 * Created by oyhk on 16/2/5.
 */
@Repository
public interface MarketOrderRepository extends JpaRepository<MarketOrder, Long>, JpaSpecificationExecutor {

    MarketOrder findByOrderNum(String orderNum);

    MarketOrder findTop1ByOrderNum(String marketOrderNum);

    MarketOrder findByDistributorMallOrderNumAndDistributorMerchantId(String orderNum, Long merchantId);
}